<?php
defined( '_GM_VALID_CALL' ) or die( 'Direct Access to this location is not allowed.' );

if(strpos(MODULE_PAYMENT_INSTALLED, 'shopgate.php') !== false) {
	include_once DIR_FS_CATALOG.'/shopgate/includes.php';
	if($p_coo_product->isProduct) {
		try {
			$config = ShopgateConfig::validateAndReturnConfig();
			if(isset($config["shop_is_active"]) && $config["shop_is_active"] == true
			&& isset($config["show_qrcode"]) && $config["show_qrcode"] == true) {
				$this->init_smarty();
				$sqr = new SmartyQrCode($this->v_coo_smarty);
				$sqr->assignProductQrCode($p_coo_product->pID);
			}
		} catch (ShopgateFrameworkException $e) { }
	}
}